Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-detect Lua compatible with installed Luabind #1185

Merged
merged 1 commit into from
Sep 19, 2014

Conversation

alex85k
Copy link
Contributor

@alex85k alex85k commented Sep 15, 2014

I tried to implement auto-detecting of compatible Lua like from #1179 using cmake. This PR is mainly for checking on Travis&Appveyor, then maybe it can be included in some form to support problematic multi-Lua systems.

@alex85k
Copy link
Contributor Author

alex85k commented Sep 15, 2014

Previous variant was finding Lua 2 times, re-pushed. New logic: if detected Lua does not work, try Lua 5.1 once more.

@alex85k
Copy link
Contributor Author

alex85k commented Sep 15, 2014

Just tried on virtual FreeBSD10 (Clang 3.3, Lua 5.1+Lua 5.2+Luabind 0.9.1 for Lua 5.1).

Current develop build fails (luabind uses 5.1, not 5.2 in includes). This branch detects that 5.2 is not suitable for luabind and compiles successfully with 5.1 version:

-- Found Lua52: /usr/local/lib/liblua-5.2.so;/usr/lib/libm.so
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing:  LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
-- Looking for Luabind...
-- Found Luabind: /usr/local/lib/libluabind.so
-- Found Luabind: /usr/local/lib/libluabind.so
-- Performing Test LUABIND_WORKS
-- Performing Test LUABIND_WORKS - Failed
Luabind does not work with /usr/local/lib/liblua-5.2.so, will try Lua 5.1.
-- Found Lua51: /usr/local/lib/liblua-5.2.so;/usr/lib/libm.so (found version "5.1.5")
-- Performing Test LUABIND51_WORKS
-- Performing Test LUABIND51_WORKS - Success
Luabind works with Lua 5.1 at /usr/local/lib/liblua-5.1.so

@alex85k
Copy link
Contributor Author

alex85k commented Sep 15, 2014

(seems to work, rebased to develop)
However, this test slows down compilation for a few seconds.

@DennisOSRM
Copy link
Collaborator

However, this test slows down compilation for a few seconds.

A couple of seconds are totally fine.

@DennisOSRM
Copy link
Collaborator

@alex85k Any updates here?

@alex85k
Copy link
Contributor Author

alex85k commented Sep 18, 2014

Oh, I missed the Appveyor tests failures (thought it works already) on Release build. Will try to check this evening.

@DennisOSRM
Copy link
Collaborator

Cool, looking forward!

@alex85k
Copy link
Contributor Author

alex85k commented Sep 18, 2014

It was always compiling test sources with Debug configuration.
Hope the magic line

SET (CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})

will help :)

@alex85k
Copy link
Contributor Author

alex85k commented Sep 18, 2014

(re-pushed after fixing variable names)

@alex85k
Copy link
Contributor Author

alex85k commented Sep 19, 2014

Seems to work this time.

@DennisOSRM
Copy link
Collaborator

Great. I'll work on getting this merged today.

@DennisOSRM DennisOSRM merged commit f14c6e6 into Project-OSRM:develop Sep 19, 2014
@DennisOSRM
Copy link
Collaborator

Thanks again, great work!

przemas75 referenced this pull request in owntracks/recorder Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants